﻿using System.Linq;
using CodingDojo.Domain.KataDiscrepancies;
using NUnit.Framework;

namespace CodingDojo.Domain.Test.KataDiscrepancies
{
  [TestFixture]
  public class TestKataDiscrepancies
  {
    [SetUp]
    public void Init()
    {
    }

    [Test]
    public void Test_An_Accommodation_Has_Up_To_Four_Transfer_Requests()
    {
      var accommodation = new Accommodation();
      Assert.IsTrue(accommodation.TransferRequests.Count() < 5);
    }

    [Test]
    public void Test_An_Accommodation_Has_An_Arrival_Main_Guest_Transfer()
    {
      var accommodation = new Accommodation();
      var transferRequest =
        accommodation.TransferRequests.Where(e => e.TypeAAA == TransferRequest.Type.Arrival).First(e => e.GuestTypeAAA == TransferRequest.GuestType.Main);
      Assert.AreEqual(101, transferRequest.Id);
    }
  }
}
